package demo1;

public class Test {
    public static void func1(Animal animal) {
    }
    public static void main(String[] args) {
        Bird bird = new Bird("大黄",5);
        bird.eat();
        Dog dog = new Dog("小鸟",2);
        dog.eat();
        Animal animal1 = new Dog("旺财",2);
        animal1.eat();
        Animal animal2 = new Bird("小麻雀",2);
        animal2.eat();
        Animal animal3 = new Animal("动物",2);
        animal3.eat();
    }
}
